<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>已办工作</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
    <style>
        table {
            border-collapse:separate;
            border-spacing:6px;
        }
    </style>
</head>
<body>
<form id="form1" method="post" style="height:90%;width: 100%;overflow-x: auto;overflow-y: auto;">
    <!-- 用户编辑框START-->
    <div id="hjHc" class="form" style="padding:10px;">
        <input name="id" id="id" class="mini-hidden" value="${prisonerHc.hcId !''}" style="width: 100%" />
        <input name="priNum" id="priNum" class="mini-hidden" value="${prisonerHc.priNum !''}" style="width: 100%" />
        <table class="form-table" align="center" style="table-layer:fixed">
            <tr>
                <td style="white-space:nowrap" align="right">户籍地址:</td>
                <td>
                    <#if prisonerHc.priAddr == "02" || prisonerHc.priAddr == "01">
                        ${prisonerHc.nativeName!''}
                    <#elseif prisonerHc.priAddr == "02" >
                        查不清户籍人员
                    <#elseif prisonerHc.priAddr == "03" >
                        户籍为监所
                    <#elseif prisonerHc.priAddr == "04" >
                        户籍为非大陆籍
                    </#if>
                </td>
            </tr>
            <#if prisonerHc.priAddr == "02" || prisonerHc.priAddr == "01">
                <td style="white-space:nowrap" align="right">居住地址:</td>
                <td>
                    ${prisonerHc.placeName!''}
                </td>
            </#if>
            <#if prisonerHc.priAddr == "03">
                <td style="white-space:nowrap" align="right">监所地址:</td>
                <td>
                    ${prisonerHc.nativeName!''}
                </td>
            </#if>
            <#if prisonerHc.priAddr == "04">
                <td style="white-space:nowrap" align="right">逮捕机构:</td>
                <td></td>
            </#if>
            <tr>
                <td style="white-space:nowrap" align="right">罪犯姓名:</td>
                <td>
                    ${prisonerHc.ppName!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">曾用姓名:</td>
                <td>
                    ${prisonerHc.usedName!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
                <td>
                    ${prisonerHc.sex!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">身份号码:</td>
                <td>
                    ${prisonerHc.idNum!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">发起核查人员姓名:</td>
                <td>
                    ${prisonerHc.startCheckPerson!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">发起核查人员固话:</td>
                <td>
                    ${prisonerHc.startCheckTel!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">发起核查人员手机号码:</td>
                <td>
                    ${prisonerHc.startCheckPhone!''}
                </td>
            </tr>
            <tr>
                <td style="white-space:nowrap" align="right">发起核查时间:</td>
                <td>
                    ${prisonerHc.startCheckTime!''}
                </td>
            </tr>
            <#if level == "06">
                <tr>
                    <td align="right" style="line-height: 10px;"><font color="#dc143c">*</font>办理:</td>
                    <td>
                        <input name="pushState" id="pushState" class="mini-radiobuttonlist" value="${pushState!''}"
                               onvaluechanged="onPushStateChanged"
                               data="[{ id: 1, name: '推送' },{ id: 3, name: '退回监狱' }]"
                               textField="name" valueField="id" value="1" required="true"/>
                    </td>
                </tr>
            <#else>
                <tr>
                    <td align="right" style="line-height: 10px;"><font color="#dc143c">*</font>办理:</td>
                    <td>
                        <input name="pushState" id="pushState" class="mini-radiobuttonlist" value="${pushState!''}"
                               onvaluechanged="onPushStateChanged"
                               data="[{ id: 1, name: '推送' },{ id: 2, name: '上报' }]"
                               textField="name" valueField="id" value="1" required="true"/>
                    </td>
                </tr>
            </#if>
            <tr>
                <td style="width:150px" align="right"><font color="#dc143c">*</font>备注信息:</td>
                <td>
                    <textarea name="priReason" id="priReason" style="width: 80%;" class="mini-textarea"
                              emptyText="请输入备注" value="" required="true"></textarea>
                </td>
            </tr>
        </table>
    </div>
    <div class="form2"  id="tsdz" style="display: none;" >
        <table align="center">
            <tr>
                <td align="right"><font color="#dc143c">*</font>推送地址</td>
                <td colspan="3" style="width: 80%">
                    <input id="nativepro" name="nativepro" class="mini-combobox" required="true" emptyText="省份"
                           style="width:22%;"
                           textfield="codeName" valueField="codeId"
                           onclick="onDeptChanged('nativepro')" onvaluechanged="onValueChanged('nativepro')"/>
                    <input id="nativecity" name="nativecity" class="mini-combobox" required="true" emptyText="市"
                           style="width: 23%"
                           textfield="codeName" valueField="codeId" onclick="onDeptChanged('nativecity')"
                           onvaluechanged="onValueChanged('nativecity')"/>
                    <input id="nativecou" name="nativecou" class="mini-combobox" required="true" emptyText="县"
                           style="width: 23%"
                           textfield="codeName" valueField="codeId" onclick="onDeptChanged('nativecou')"
                           onvaluechanged="onValueChanged('nativecou')"/>
                    <input id="nativevill" name="nativevill" class="mini-combobox" emptyText="街道" style="width:23%"
                           textfield="codeName" valueField="codeId" onclick="onDeptChanged('nativevill')"
                           required="true"/>
                </td>
            </tr>
            <tr>
                <td style="width: 20%;text-align: right"></td>
                <td colspan="3" style="width: 80%">
                    <input class="mini-textbox" required="true" style="width: 92.5%" emptyText="详细地址" id="nativenum"
                           name="nativenum" />
                </td>
            </tr>
        </table>
    </div>
    <div>
        <table class="form-table" align="center">
            <tr>
                <td><font color="#dc143c">*</font>处理人员:</td>
                <td class="input">
                    <input name="pushName" id="pushName" value="${prisonerHc.pushName!''}"
                           style="width: 150px" class="mini-textbox" required="true" readonly/></td>
                </td>
                <td>办理人手机号码:</td>
                <td class="input">
                    <input name="phoneNumber" id="phoneNumber" value="${prisonerHc.phoneNumber!''}"
                           style="width: 110px" emptyText="请输入手机号码" class="mini-textbox" readonly/>
                </td>
                <td>办理人固话:</td>
                <td class="input">
                    <input name="fixedLineNumber" id="fixedLineNumber" value="${prisonerHc.fixedLineNumber!''}"
                           style="width: 110px" emptyText="请输入固定电话" class="mini-textbox" readonly/>
                </td>
            </tr>
            <tr></tr>
        </table>
    </div>
</form>
<script type="text/javascript">
    mini.parse();

    var form = new mini.Form("form1");
    var nativepro = mini.get("nativepro");
    var nativecity = mini.get("nativecity");
    var nativecou = mini.get("nativecou");
    var nativevill = mini.get("nativevill");
    var nativenum = mini.get("nativenum");
    var priReason = mini.get("priReason");
    var phoneNumber = mini.get("phoneNumber");
    var fixedLineNumber = mini.get("fixedLineNumber");
    var pushName = mini.get("pushName");
    var pushStateObj = mini.get("pushState");
    var newNativenum = mini.get("nativenum");

    window.onload = function (){
        SetData(${id!''});
    }

    function SetData (data) {
        nativepro.setEnabled(false);
        nativecity.setEnabled(false);
        nativecou.setEnabled(false);
        nativevill.setEnabled(false);
        priReason.setEnabled(false);
        phoneNumber.setEnabled(false);
        fixedLineNumber.setEnabled(false);
        pushName.setEnabled(false);
        pushStateObj.setEnabled(false);
        nativenum.setEnabled(false);
        $.ajax({
            url: "/azbj/ts/searchBaseInfoById",
            type: "get",
            data: {id : data},
            success: function (success) {
                if (success.code == 1) {
                    var bsdata = success.data;
                    pushStateObj.setValue(bsdata.pushState);
                    priReason.setValue(bsdata.priReason);
                    onPushStateChanged();
                    nativepro.setValue(bsdata.newNativepro);
                    nativepro.setText(bsdata.newNativeproName);
                    nativecity.setValue(bsdata.newNativecity);
                    nativecity.setText(bsdata.newNativecityName);
                    nativecou.setValue(bsdata.newNativecou);
                    nativecou.setText(bsdata.newNativecouName);
                    nativevill.setValue(bsdata.newNativevill);
                    nativevill.setText(bsdata.newNativevillName);
                    newNativenum.setValue(bsdata.newNativenum);
                    pushName.setValue(bsdata.operationName);
                    phoneNumber.setValue(bsdata.phoneNumber);
                    fixedLineNumber.setValue(bsdata.fixedlineNumber);
                }
            }
        });
    }

    function onPushStateChanged(){
        var pushstate = pushStateObj.getValue();
        if(pushstate){
            if(pushstate==1){
                document.getElementById("tsdz").style.display="block";
            }else{
                document.getElementById("tsdz").style.display="none";
                var level = '${level!''}';
                if (level == '08') {
                    nativepro.setReadOnly(true);
                    nativecity.setReadOnly(true);
                    nativecou.setReadOnly(true);
                    nativepro.disable();
                    nativecity.disable();
                    nativecou.disable();
                } else if(level == '07') {
                    nativepro.setReadOnly(true);
                    nativecity.setReadOnly(true);
                    nativepro.disable();
                    nativecity.disable();
                } else if(level == '06') {
                    nativepro.setReadOnly(true);
                    nativepro.disable();
                }
            }
        }
    }
</script>
</body>
</html>